<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>后台页面</title>
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
		<link rel="stylesheet" href="./css/layui/css/layui.css" media="all">
		<link rel="stylesheet" href="./layuiadmin/style/admin.css" media="all">
		<link rel="stylesheet" href="./css/style.css" media="all">
		<link rel="stylesheet" href="asserts/css/layui/css/layui.css" media="all">
		<link rel="stylesheet" href="asserts/css/style/admin.css" media="all">
		<!-- Bootstrap core CSS -->
		<link href="asserts/css/bootstrap.min.css" rel="stylesheet">
		
		<!-- Custom styles for this template -->
		<link href="asserts/css/dashboard.css" rel="stylesheet">
	</head>
	<body class="layui-layout-body" >
	<script type="text/javascript" src="js/jquery-1.7.1.min.js"></script>
	<script>
		var url = window.location.search; //获取url中"?"符后的字串 ('?modFlag=business&role=1')
		var theRequest = new Object();
		if (url.indexOf('?') != -1) {
			var str = url.substr(1); //substr()方法返回从参数值开始到结束的字符串；
			var strs = str.split('&');
			for (var i = 0; i < strs.length; i++) {
				theRequest[strs[i].split('=')[0]] = decodeURI(decodeURI(strs[i].split('=')[1]));
			}
		}
		var id=theRequest.id;
		var name="";
		if (theRequest.usertype!="超级管理员"){
			name=theRequest.username;
		}
		var sex=theRequest.usersex;
		var type=theRequest.usertype;
		console.log(id+" "+name+" "+sex+" "+type);
		$(function(){
			if(type=="超级管理员"){
				$("#user_admin_page").show();
			}else if(type=="管理员"){
				$("#user_admin_page").hide();
			}
		});
	</script>
		<style>
		/* 这段样式只是用于演示 */
		#LAY-component-nav .layui-nav-tree {vertical-align: top;}
		</style>
		<!-- 侧边菜单 -->
		<div class="container-fluid">
			<div class="row">
				<nav class="col-md-1 d-none d-md-block bg-light sidebar" id="nav_reight">
					<div>
						<ul class="nav flex-column" >
							<li class="nav-item">
								<a class="nav-link active" href="" onclick="mainAdd1();return false;" style="color: #000000;">
									<img src="icon/biaoge.png" width="20px" height="20px">
									个人信息
								</a>
							</li>
							<li class="nav-item" id="user_admin_page">
								<a class="nav-link" href=""  onclick="page_click('userAdmin');return false;">
									<img src="icon/search.png" width="20px" height="20px">
									用户管理
								</a>
							</li>
							<li class="nav-item">
								<a class="nav-link" href=""  onclick="page_click('directoryFileManagement');return false;">
									<img src="icon/show.png" width="20px" height="20px">
									我的云盘
								</a>
							</li>
							<li class="nav-item">
								<a class="nav-link" href="index.html">
									<img src="icon/tuichu.png" width="20px" height="20px">
									退出系统
								</a>
							</li>
						</ul>
					</div>
				</nav>
				<iframe class=" iframe_style" src="personal.html"></iframe>
			</div>
		</div>
	<script src="./css/layui/layui.js"></script>
		  <script>
			  function page_click(page_html){
				  var iframe=document.querySelector(".iframe_style");
				  if('userAdmin'==page_html){
					  iframe.setAttribute("src","userAdmin.html");
				  }else if('directoryFileManagement'==page_html){
					  iframe.setAttribute("src","directoryFileManagement.html");
				  }else if('personal'==page_html){
					  iframe.setAttribute("src","personal.html");
				  }
			  }
		  layui.config({
		    base: './css/' //静态资源所在路径
		  }).extend({
		    index: 'lib/index' //主入口模块
		  }).use(['index'], function(){
		    var $ = layui.$
		    ,admin = layui.admin
		    ,element = layui.element;
		  
		    element.render('nav', 'component-nav');
		    element.render('nav', 'component-nav-active');
		    
		    element.on('nav(component-nav-active)', function(elem){
		      layer.msg(elem.text());
		    });
		  });
		  </script>
	</body>
</html>
